package com.rabbit.vo.req;

import com.rabbit.dto.PageInfoDTO;
import com.rabbit.validate.base.Delete;
import com.rabbit.validate.base.Insert;
import com.rabbit.validate.base.Update;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author zjw
 * @date 2022/1/21 14:47
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ConfigReq extends PageInfoDTO {

    /**
     * 参数编号
     */
    @NotNull(message = "参数编号不能为空", groups = {Delete.class, Update.class})
    private Long configId;

    /**
     * 参数名称
     */
    @NotEmpty(message = "参数名称不能为空", groups = {Insert.class, Update.class})
    private String configName;

    /**
     * 参数Key
     */
    @NotEmpty(message = "参数Key不能为空", groups = {Insert.class, Update.class})
    private String configKey;

    /**
     * 参数Value
     */
    @NotEmpty(message = "参数值不能为空", groups = {Insert.class, Update.class})
    private String configValue;

    /**
     * 备注
     */
    private String remark;

    /**
     * 操作人姓名
     */
    private String operatorUserName;

}
